package com.charlotte.study.gupao.observer.guava.gper;


import com.google.common.eventbus.Subscribe;

/**
 * 老师抽象类
 * @author junjie.ding
 * @date 2020/3/25
 */
public abstract class Teacher {

    @Subscribe
    protected final void subscribe(Question question){
        if(question.getTeacher().getClass() == this.getClass()){
            this.doHandler(question);
        }
    }


    protected abstract void doHandler(Question question);

}
